
$(document).ready(function(){
	$("#calais_form").live("submit", function(event) {
		event.preventDefault();
		var form = $("#calais_form");
		var data = form.serialize();
		$("#calais_sub").attr('disabled', true);
		$("#message_area").prepend('Hang on...');
		$.ajax({
			url: "/calais-api/",
			type: "POST",
			data: data,
			success: function(html){
				$("#calais_form").replaceWith(html);
			}
		});
	});
});

